import { defineComponent, ref } from 'vue'

const Home = defineComponent({
  setup (props, { slots }) {
    const num = ref(0)

    const addNum = () => {
      num.value++
    }

    return () => (
      <div onClick={addNum}>这是一个组件{num.value}
        <div>{slots.title}</div>
      </div>
    )
  }
})

export default Home
